import { Loading } from "element-ui";
let loadingInstance;

export const openLoading = () => {
  loadingInstance = Loading.service({
    lock: true,
    text: "Loading",
    spinner: "el-icon-loading",
    background: "rgba(0, 0, 0, 0.1)",
  });
};

export const closeLoading = () => {
  if (!loadingInstance) return;
  loadingInstance.close();
};
